package org.jeecg.modules.hc.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.hc.enums.HcIsFlagEnum;
import org.jeecg.modules.hc.enums.HcUpFlagEnum;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * @Description: 商品
 * @Author: jeecg-boot
 * @Date: 2022-12-13
 * @Version: V1.0
 */
@Data
@TableName("hc_commodity")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "hc_commodity对象", description = "商品")
public class HcCommodity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    @ApiModelProperty(value = "显示规格")
    private java.lang.String specifications;

    @TableField(exist = false)
    @ApiModelProperty(value = "勾选的id")
    private String selections;

    @TableField(exist = false)
    @ApiModelProperty(value = "门店名称")
    private java.lang.String storeName;

    @TableField(exist = false)
    @ApiModelProperty(value = "门店LOGO")
    private java.lang.String logo;

    @TableField(exist = false)
    @ApiModelProperty(value = "已售数量")
    private Integer soldCount;

    @TableField(exist = false)
    @ApiModelProperty(value = "剩余数量")
    private Integer remainingQuantity;

    @TableField(exist = false)
    @ApiModelProperty(value = "购物车数量")
    private Integer shoppingCartCount;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private java.lang.String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
    /**
     * 商户ID
     */
    @Excel(name = "商户ID", width = 15)
    @ApiModelProperty(value = "商户ID")
    @Dict(dictTable = "HC_MERCHANT", dicCode = "ID", dicText = "STORE_NAME")
    private java.lang.String merchantId;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称", width = 15)
    @ApiModelProperty(value = "商品名称")
    private java.lang.String tradeName;
    /**
     * 商品描述
     */
    @Excel(name = "商品描述", width = 15)
    @ApiModelProperty(value = "商品描述")
    private java.lang.String productDescription;
    /**
     * 商品价格
     */
    @Excel(name = "商品价格", width = 15)
    @ApiModelProperty(value = "商品价格")
    private java.math.BigDecimal commodityPrice;

    @TableField(exist = false)
    @ApiModelProperty(value = "未添加佣金的价格，下单的时候用")
    private java.math.BigDecimal originalPrice;

    @TableField(exist = false)
    @ApiModelProperty(value = "佣金，下单的时候用")
    private java.math.BigDecimal commission;

    @TableField(exist = false)
    private java.math.BigDecimal commodityPriceCache;

    /**
     * 商品图片
     */
    @Excel(name = "商品图片", width = 15)
    @ApiModelProperty(value = "商品图片")
    private java.lang.String productPicture;
    /**
     * 规格
     */
    @Excel(name = "规格", width = 15)
    @ApiModelProperty(value = "规格")
    private java.lang.String commoditySpecifications;

    /**
     * 限购
     */
    @Excel(name = "限购", width = 15)
    @ApiModelProperty(value = "限购")
    private java.lang.Integer limitBuy;
    /**
     * 是否上架
     */
    @Excel(name = "是否上架", width = 15)
    @ApiModelProperty(value = "是否上架")
    private HcUpFlagEnum upFlag;
    /**
     * 是否启用规格
     */
    @Excel(name = "是否启用规格", width = 15)
    @ApiModelProperty(value = "是否启用规格")
    private HcIsFlagEnum specificationsFlag;
    /**
     * 排序
     */
    @Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    private java.lang.Integer sort;
    /**
     * 是否必选
     */
    @Excel(name = "是否必选", width = 15)
    @ApiModelProperty(value = "是否必选")
    private HcIsFlagEnum requiredFlag;

    @TableLogic
    private Integer delFlag;
}
